<!DOCTYPE html>
<html>
<head>
  <title>Taller1</title>
  <%= stylesheet_link_tag    "application" %>
  <%= javascript_include_tag "application" %>
  <META NAME="iic2515-2" CONTENT="1.2.0">
  <%= csrf_meta_tags %>
</head>
<body>
	<p class="notice"><%= notice %></p>
	<p class="alert"><%= alert %></p>
	<div id="user_nav">
	  <% if user_signed_in? %>
	    Iniciado sesión como <%= current_user.email %>.</br> 
		No eres tu? <%= button_to  "Cerrar sesión", destroy_user_session_path, :method => :delete %>
 
	  <% else %>
	    <%= link_to "Suscríbete!", new_user_registration_path %> o 
	    
		<%= form_tag user_session_path do%>
		<%= label_tag( "Login:")%>
		<%= text_field_tag 'user[login]'%></br>
		<%= label_tag("Contraseña:")%>
		<%= password_field_tag 'user[password]'%></br>
		<%= check_box_tag 'user[remember_me]'%>
		<%= label_tag 'user[remember_me]', 'Remember me'%>
		<%= submit_tag( "Iniciar sesión")%>
		<%= link_to "Olvidaste tu contraseña?", new_password_path('user')%>
		<%end%>
		
	  <% end %>
	</div>
<%= yield %>

</body>
</html>
